package ru.reaperoq.taskmanager.models

import jakarta.persistence.*
import java.time.LocalDateTime

@Entity
open class Timetable(
    @Id @GeneratedValue(strategy = GenerationType.SEQUENCE)
    open val id: Long? = null,
    @Temporal(TemporalType.TIMESTAMP)
    open val timestamp: LocalDateTime,

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    open val user: User,
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    open val list: TaskList
)